/* $RCSFile: ADNDynServiceappointment.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/CRMWrapper3/DynEntities/ADNDynServiceappointment.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:33  christian.surieux
 *   Added Log to All cs files
 */

/* Copyrights Christian Surieux 2010 */
/* Class ADNDynServiceappointment */
/* Date 2010-01-10 19:48:40Z */

using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using CrmSdk;

namespace AddonNice.CRMWrapper
{

	public class ADNDynServiceappointment : ADNDynActivity
	{
		/* Internal class for DynTypes */
		protected class Ftor: DFactor
		{
			public Ftor() : base(CrmStr.serviceappointment){}
			public override Type DynType
			{	get{return typeof(ADNDynServiceappointment);}}
			public override string DynTypename
			{	get{return CrmStr.serviceappointment;}}
			public override DynEntity Build()
			{	return new ADNDynServiceappointment();}
			public override DynEntity Build(CRMWrapperBase w, InternalDynamicEntity dEntity, PropertyDescriptorCollection wproperties)
			{	return new ADNDynServiceappointment(w, dEntity, wproperties, null);}
			public override DynEntity Build(CRMWrapperBase w, string PrimaryFieldValue)
			{	return new ADNDynServiceappointment(w, PrimaryFieldValue);}
			public override DynEntity Build(CRMWrapperBase w,Guid PrimaryKeyValue)
			{	return new ADNDynServiceappointment(w,PrimaryKeyValue);}
		}
		/* Static Ctor to register in DynTypes */
		static ADNDynServiceappointment(){new Ftor();}

		public override bool HasOwningBusinessUnitProperty
		{	get{ return true;}}
		public ADNDynServiceappointment(): base(){}
		public ADNDynServiceappointment(CRMWrapperBase w, string PrimaryFieldValue): base(w, PrimaryFieldValue,CrmStr.serviceappointment)
		{
			if ( PrimaryFieldValue != string.Empty )
			    subject	=   PrimaryFieldValue;
		}
		public ADNDynServiceappointment(CRMWrapperBase w, Guid CrmId): base(w,CrmStr.serviceappointment, CrmId){}
		public ADNDynServiceappointment(CRMWrapperBase w, InternalDynamicEntity e): base(w,CrmStr.serviceappointment,e,null,null){}
		public ADNDynServiceappointment(CRMWrapperBase w, InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s): base(w,CrmStr.serviceappointment,e,prop,s){}
		public ADNDynServiceappointment(ResetWrapperHandler fn, string PrimaryFieldValue): base(fn,PrimaryFieldValue,CrmStr.serviceappointment)
		{
			if ( PrimaryFieldValue != string.Empty )
				subject	=   PrimaryFieldValue;
		}
		public ADNDynServiceappointment(ResetWrapperHandler fn, Guid CrmId): base(fn,CrmStr.serviceappointment,CrmId){}
		public ADNDynServiceappointment(ResetWrapperHandler fn,InternalDynamicEntity e): base(fn,CrmStr.serviceappointment,e,null,null){}
		public ADNDynServiceappointment(ResetWrapperHandler fn,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s): base(fn,CrmStr.serviceappointment,e,prop,s){}

		/* Properties */

		public bool isalldayevent
		{
			get	{	return BooleanPropertyValue(CrmStr.isalldayevent);}
    		set	{	AddBooleanProperty(CrmStr.isalldayevent, value);}
		}

		[CrmDynAttribute(CrmStr.serviceappointment)]
		public string location
		{
		    get	{	 return StringPropertyValue(CrmStr.location);}
		    set	{	AddStringProperty(CrmStr.location, value);}
		}

		[CrmDynAttribute(CrmStr.serviceappointment)]
		public Guid siteid
		{
		    get	{	return LookupPropertyValue(CrmStr.siteid);}
		    set	{	AddLookupProperty(CrmStr.siteid,CrmStr.site,value);}
		}

		public string siteName
		{
		    get	{	 return LookupPropertyName(CrmStr.siteid);}
		}

		[CrmDynAttribute(CrmStr.serviceappointment)]
		public Guid subscriptionid
		{
		    get	{	return UniqueIdentifierPropertyValue(CrmStr.subscriptionid);}
		    set	{	AddUniqueIdentifierProperty(CrmStr.subscriptionid, value);}
		}
	}
}